<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" />
<title></title>
<style type="text/css">

/*
:Author: David Goodger
:Contact: goodger@users.sourceforge.net
:Date: $Date: 2005-12-18 01:56:14 +0100 (Sun, 18 Dec 2005) $
:Revision: $Revision: 4224 $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.

See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/

/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
  border: 0 }

table.borderless td, table.borderless th {
  /* Override padding for "table.docutils td" with "! important".
     The right padding separates the table cells. */
  padding: 0 0.5em 0 0 ! important }

.first {
  /* Override more specific margin styles with "! important". */
  margin-top: 0 ! important }

.last, .with-subtitle {
  margin-bottom: 0 ! important }

.hidden {
  display: none }

a.toc-backref {
  text-decoration: none ;
  color: black }

blockquote.epigraph {
  margin: 2em 5em ; }

dl.docutils dd {
  margin-bottom: 0.5em }

/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
  font-weight: bold }
*/

div.abstract {
  margin: 2em 5em }

div.abstract p.topic-title {
  font-weight: bold ;
  text-align: center }

div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
  margin: 2em ;
  border: medium outset ;
  padding: 1em }

div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
  font-weight: bold ;
  font-family: sans-serif }

div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title {
  color: red ;
  font-weight: bold ;
  font-family: sans-serif }

/* Uncomment (and remove this text!) to get reduced vertical space in
   compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
  margin-bottom: 0.5em }

div.compound .compound-last, div.compound .compound-middle {
  margin-top: 0.5em }
*/

div.dedication {
  margin: 2em 5em ;
  text-align: center ;
  font-style: italic }

div.dedication p.topic-title {
  font-weight: bold ;
  font-style: normal }

div.figure {
  margin-left: 2em ;
  margin-right: 2em }

div.footer, div.header {
  clear: both;
  font-size: smaller }

div.line-block {
  display: block ;
  margin-top: 1em ;
  margin-bottom: 1em }

div.line-block div.line-block {
  margin-top: 0 ;
  margin-bottom: 0 ;
  margin-left: 1.5em }

div.sidebar {
  margin-left: 1em ;
  border: medium outset ;
  padding: 1em ;
  background-color: #ffffee ;
  width: 40% ;
  float: right ;
  clear: right }

div.sidebar p.rubric {
  font-family: sans-serif ;
  font-size: medium }

div.system-messages {
  margin: 5em }

div.system-messages h1 {
  color: red }

div.system-message {
  border: medium outset ;
  padding: 1em }

div.system-message p.system-message-title {
  color: red ;
  font-weight: bold }

div.topic {
  margin: 2em }

h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
  margin-top: 0.4em }

h1.title {
  text-align: center }

h2.subtitle {
  text-align: center }

hr.docutils {
  width: 75% }

img.align-left {
  clear: left }

img.align-right {
  clear: right }

ol.simple, ul.simple {
  margin-bottom: 1em }

ol.arabic {
  list-style: decimal }

ol.loweralpha {
  list-style: lower-alpha }

ol.upperalpha {
  list-style: upper-alpha }

ol.lowerroman {
  list-style: lower-roman }

ol.upperroman {
  list-style: upper-roman }

p.attribution {
  text-align: right ;
  margin-left: 50% }

p.caption {
  font-style: italic }

p.credits {
  font-style: italic ;
  font-size: smaller }

p.label {
  white-space: nowrap }

p.rubric {
  font-weight: bold ;
  font-size: larger ;
  color: maroon ;
  text-align: center }

p.sidebar-title {
  font-family: sans-serif ;
  font-weight: bold ;
  font-size: larger }

p.sidebar-subtitle {
  font-family: sans-serif ;
  font-weight: bold }

p.topic-title {
  font-weight: bold }

pre.address {
  margin-bottom: 0 ;
  margin-top: 0 ;
  font-family: serif ;
  font-size: 100% }

pre.literal-block, pre.doctest-block {
  margin-left: 2em ;
  margin-right: 2em ;
  background-color: #eeeeee }

span.classifier {
  font-family: sans-serif ;
  font-style: oblique }

span.classifier-delimiter {
  font-family: sans-serif ;
  font-weight: bold }

span.interpreted {
  font-family: sans-serif }

span.option {
  white-space: nowrap }

span.pre {
  white-space: pre }

span.problematic {
  color: red }

span.section-subtitle {
  /* font-size relative to parent (h1..h6 element) */
  font-size: 80% }

table.citation {
  border-left: solid 1px gray;
  margin-left: 1px }

table.docinfo {
  margin: 2em 4em }

table.docutils {
  margin-top: 0.5em ;
  margin-bottom: 0.5em }

table.footnote {
  border-left: solid 1px black;
  margin-left: 1px }

table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
  padding-left: 0.5em ;
  padding-right: 0.5em ;
  vertical-align: top }

table.docutils th.field-name, table.docinfo th.docinfo-name {
  font-weight: bold ;
  text-align: left ;
  white-space: nowrap ;
  padding-left: 0 }

h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
  font-size: 100% }

tt.docutils {
  background-color: #eeeeee }

ul.auto-toc {
  list-style-type: none }

</style>
</head>
<body>
<div class="document">
<div class="section">
<h1><a class="toc-backref" href="#id1" id="running-d-bridge-on-linux-using-dosemu" name="running-d-bridge-on-linux-using-dosemu">Running D'Bridge on Linux using DOSEMU</a></h1>
<!-- # NOTE: This document uses "reStructuredText" markup.  While
# it is readable as a plain text document, you can also
# generate an HTML version of the document using a
# reStructuredText parser, such as rst2html, which is part
# of the Python docutils package.  The HTML version, in
# addition to easier navigation, will also have screenshots
# and other material not available in the text-only version. -->
<p>by Lars Kellogg-Stedman (1:322/761)</p>
<div class="contents topic">
<p class="topic-title first"><a id="contents" name="contents">Contents</a></p>
<ul class="simple">
<li><a class="reference" href="#running-d-bridge-on-linux-using-dosemu" id="id1" name="id1">Running D'Bridge on Linux using DOSEMU</a></li>
<li><a class="reference" href="#access-permissions" id="id2" name="id2">Access permissions</a></li>
<li><a class="reference" href="#configuring-binkd" id="id3" name="id3">Configuring BinkD</a><ul>
<li><a class="reference" href="#inbound-directory" id="id4" name="id4">Inbound directory</a></li>
<li><a class="reference" href="#outbound-directories" id="id5" name="id5">Outbound directories</a></li>
<li><a class="reference" href="#semaphore-files" id="id6" name="id6">Semaphore files</a></li>
</ul>
</li>
<li><a class="reference" href="#configuring-dosemu" id="id7" name="id7">Configuring DOSEmu</a></li>
<li><a class="reference" href="#installing-d-bridge" id="id8" name="id8">Installing D'Bridge</a></li>
<li><a class="reference" href="#configuring-d-bridge" id="id9" name="id9">Configuring D'Bridge</a><ul>
<li><a class="reference" href="#configurign-directory-paths" id="id10" name="id10">Configurign directory paths</a></li>
<li><a class="reference" href="#configuring-your-binkd-sessions" id="id11" name="id11">Configuring your BinkD sessions</a></li>
</ul>
</li>
<li><a class="reference" href="#how-i-m-using-d-bridge" id="id12" name="id12">How I'm using D'Bridge</a></li>
</ul>
</div>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id2" id="access-permissions" name="access-permissions">Access permissions</a></h1>
<p>You're going to end up with D'Bridge and BinkD sharing directories for the
purpose of exchanging inbound and outbound mail.  Your life will be easiest
if both D'Bridge and BinkD are running as the same user id.  If you're
using the Ubuntu default install of BinkD, this will be the user &quot;ftn&quot;.</p>
<p>If for whatever reason you're running them as different users, you'll need
to work out the necessary group permissions and umasks to make sure that
they can both create, read, and delete files in your inbound and outbound
directories.</p>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id3" id="configuring-binkd" name="configuring-binkd">Configuring BinkD</a></h1>
<p>The most important parts of your BinkD configuration, from our perspective
of getting it to interoperate with D'Bridge, are your selection of inbound
and outbound directories.  These directories will be shared between BinkD
and D'Bridge.</p>
<div class="section">
<h2><a class="toc-backref" href="#id4" id="inbound-directory" name="inbound-directory">Inbound directory</a></h2>
<p>BinkD uses one or two inbound directories, defined with the <tt class="docutils literal"><span class="pre">inbound</span></tt> and
<tt class="docutils literal"><span class="pre">inbound-secure</span></tt> keywords.  The latter is used for files received during
an authenticated session.  A typical leaf-node configuration has these set
to the same directory:</p>
<pre class="literal-block">
inbound /var/spool/ftn/inb
inbound-nonsecure /var/spool/ftn/inb
</pre>
</div>
<div class="section">
<h2><a class="toc-backref" href="#id5" id="outbound-directories" name="outbound-directories">Outbound directories</a></h2>
<p>BinkD has one &quot;general purpose&quot; outbound directory for each FTN network of
which you are a member.  Assuming you are only connected to Fidonet, your
configuration might look something like this:</p>
<pre class="literal-block">
domain fidonet /var/spool/ftn/outb 1
domain fidonet.org alias-for fidonet
domain fidonet.net alias-for fidonet
domain fido alias-for fidonet
</pre>
<p>This establishes <tt class="docutils literal"><span class="pre">/var/spool/ftn/outb</span></tt> as your Fidonet outbound directory
(and creates several domain aliases for 5D-style addresses).  Files dropped
in this directory need a corresponding FLO file to tell BinkD where they
should be sent.  You won't use this directory much if you're only using
D'Bridge, but other software (such as Synchronet) will need it.</p>
<p>D'Bridge passes outbound mail to BinkD primarily through the use of
&quot;mailbox&quot; directories.  A mailbox directory is an outbound directory
associated with a particular node, and are configured using the <tt class="docutils literal"><span class="pre">node</span></tt>
keyword in your BinkD configuration.  Files in an outbound mailbox will be
sent whenever you connect to the remote node (and possibly whenever they
connect to you).</p>
<p>For example, there are two systems that I pass mail to, so my configuration
looks like this:</p>
<pre class="literal-block">
node 1:123/500 the-estar.com  PASSWORD c /var/spool/ftn/outb/ESTAR    -
node 1:322/759 mysticfo.com   PASSWORD c /var/spool/ftn/outb/MYSTICFO -
</pre>
<p>This defines <tt class="docutils literal"><span class="pre">/var/spool/ftn/outb/ESTAR</span></tt> as the outbound mailbox for
connections to/from the-estar.com and <tt class="docutils literal"><span class="pre">/var/spool/ftn/outb/MYSTICFO</span></tt> for
connectios to/from mysticfo.com.</p>
<p>The names of these directories must correspond to identifiers you'll enter
into your D'Bridge configuration later on.</p>
</div>
<div class="section">
<h2><a class="toc-backref" href="#id6" id="semaphore-files" name="semaphore-files">Semaphore files</a></h2>
<p>In order to get D'Bridge to process new mail, you will need to create a
&quot;semaphore file&quot;, usually <tt class="docutils literal"><span class="pre">c:\db\dbridge.rsn</span></tt> from the perspective of the
DOS environment.  A semaphore file is simply an empty file that D'Bridge
looks for periodically.  When it sees the file, it will scan for new
inbound mail (and delete the semaphore file).</p>
<p>The easiest way to create the semaphore file is through the use of the
&quot;flag&quot; keyword in your BinkD configuration.  For example, assuming that
your D'Bridge VM is installed as /opt/dbridge, you might have the following
flag statements:</p>
<pre class="literal-block">
flag /opt/dbridge/drives/c/db/dbridge.rsn *.pkt *.PKT
flag /opt/dbridge/drives/c/db/dbridge.rsn *.su? *.mo? *.tu? *.we? *.th? *.fr? *.sa?
flag /opt/dbridge/drives/c/db/dbridge.rsn *.SU? *.MO?  *.TU? *.WE? *.TH? *.FR? *.SA?
</pre>
<p>This example directs BinkD to create the named file whenever BinkD receives
a file matching one of the listed extensions.</p>
</div>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id7" id="configuring-dosemu" name="configuring-dosemu">Configuring DOSEmu</a></h1>
<p>There are a number of ways one could configure DOSEmu.  I prefer a model in
which all of the files and directories associated with a particular virtual
machine are stored in a single directory.</p>
<ol class="arabic">
<li><p class="first">Create a directory to hold the D'Bridge VM:</p>
<pre class="literal-block">
mkdir dbridge
</pre>
</li>
<li><p class="first">Inside this directory, create a &quot;drives&quot; subdirectory that will hold our
virtual drives:</p>
<pre class="literal-block">
mkdir dbridge/drives
</pre>
</li>
<li><p class="first">Create a directory for the <tt class="docutils literal"><span class="pre">C:</span></tt> drive:</p>
<pre class="literal-block">
mkdir dbridge/drives/c
</pre>
</li>
<li><p class="first">Create a symlink to the FTN spool directory.  I like to use <tt class="docutils literal"><span class="pre">S:</span></tt> (for
&quot;spool&quot;):</p>
<pre class="literal-block">
ln -s /var/spool/ftn dbridge/drives/s
</pre>
</li>
<li><p class="first">Put the following script in <tt class="docutils literal"><span class="pre">dbridge/run</span></tt>:</p>
<pre class="literal-block">
#!/bin/sh

EMUSETUP=drives/c/emusetup.bat

echo &quot;&#64;echo off&quot; &gt; $EMUSETUP

for d in drives/*; do
        [ -d &quot;$d&quot; ] &amp;&amp; echo lredir $(basename $d): linux/fs$(pwd)/$d |
                sed 's|/|\\|g' &gt;&gt; $EMUSETUP
done

cat &gt;&gt; drives/c/emusetup.bat &lt;&lt;EOF
c:
if exist autoexec.bat call autoexec.bat
${COMMAND:-c:\\db\\db}
EOF

dosemu $(pwd)/drives/c/emusetup.bat
</pre>
<p>And make the script executable:</p>
<pre class="literal-block">
chmod 755 run
</pre>
<p>This script will generates the necessary &quot;lredir&quot; commands to make the
contents of your <tt class="docutils literal"><span class="pre">drives/</span></tt> directory show up as the corresponding DOS
drives.  It will also start up D'Bridge unless we tell it otherwise
(which we will for the D'Bridge install later on in this document).</p>
<p>If you want to run additional commands when your VM starts up, put them
in <tt class="docutils literal"><span class="pre">drives/c/autoexec.bat</span></tt>.</p>
</li>
</ol>
<p>The finished directory should look like this:</p>
<pre class="literal-block">
dbridge
dbridge/run
dbridge/drives
dbridge/drives/c
dbridge/drives/s
</pre>
<p>You can now start up this DOSEmu virtual machine by running:</p>
<pre class="literal-block">
cd dbridge &amp;&amp; ./run command
</pre>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id8" id="installing-d-bridge" name="installing-d-bridge">Installing D'Bridge</a></h1>
<p>In the following steps, we assume that the variable <tt class="docutils literal"><span class="pre">DBROOT</span></tt> points to
the directory you created in the &quot;Configuring DOSEmu&quot; section.</p>
<ol class="arabic">
<li><p class="first">Create a directory called &quot;install&quot; in the &quot;C:&quot; drive folder of your DOSEmu
environment:</p>
<pre class="literal-block">
cd $DBROOT/drives/c
mkdir install
</pre>
</li>
<li><p class="first">Unpack the DB299.ZIP archive into the install directory:</p>
<pre class="literal-block">
cd install
unzip /path/to/DB299.ZIP
</pre>
</li>
<li><p class="first">Now boot up your DOSEmu environment:</p>
<pre class="literal-block">
cd $DBROOT &amp;&amp; ./run command
</pre>
<p>Note that we're passing the extra argument <tt class="docutils literal"><span class="pre">command</span></tt>.  This causes the
run script to dump us to a command prompt rather than trying to start
D'Bridge, which is the default behavior.</p>
</li>
<li><p class="first">Run the D'Bridge installer:</p>
<pre class="literal-block">
C:\&gt;cd install
C:\install&gt;DB299
</pre>
</li>
<li><p class="first">Accept the defaults presented by the installer until you get to the
screen labelled &quot;Fidonet Plug and Play/Installation&quot;.  On this screen, make
sure you select &quot;Plain DOS&quot;:</p>
<div class="figure">
<img alt="images/fpnp-install.png" src="images/fpnp-install.png" />
</div>
</li>
<li><p class="first">On the following screen, select &quot;BINKD&quot; for your connection method.</p>
<div class="figure">
<img alt="images/fpnp-binkd.png" src="images/fpnp-binkd.png" />
</div>
</li>
</ol>
<p>Once the installer finishes, it will launch D'Bridge.  You'll probably see
some errors in the log window (because you probably haven't yet installed a
nodelist), but otherwise things should look something like this:</p>
<blockquote>
<div class="figure">
<img alt="images/db-initial.png" src="images/db-initial.png" />
</div>
</blockquote>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id9" id="configuring-d-bridge" name="configuring-d-bridge">Configuring D'Bridge</a></h1>
<div class="section">
<h2><a class="toc-backref" href="#id10" id="configurign-directory-paths" name="configurign-directory-paths">Configurign directory paths</a></h2>
<ol class="arabic simple">
<li>Go to Config-&gt;Directory Paths.</li>
<li>Set your &quot;Inbound Files Path&quot; to the DOS
path corresponding to your BinKD inbound directory.  In my environment,
this is <tt class="docutils literal"><span class="pre">S:\INB</span></tt>.</li>
</ol>
</div>
<div class="section">
<h2><a class="toc-backref" href="#id11" id="configuring-your-binkd-sessions" name="configuring-your-binkd-sessions">Configuring your BinkD sessions</a></h2>
<ol class="arabic">
<li><p class="first">Go to Config-&gt;BINKD/Fido Plug &amp; Play</p>
</li>
<li><p class="first">Set &quot;BINKD gating/capabilities&quot; to &quot;Linux&quot;.</p>
</li>
<li><p class="first">Set &quot;Base directory for mailboxes&quot; to the DOS path corresponding to your
BinkD outbound directory.  On my system, this is <tt class="docutils literal"><span class="pre">S:\OUTB</span></tt>.  This
directory should contain your mailbox directories as defined in the
<tt class="docutils literal"><span class="pre">node</span></tt> statements in your BinkD configuration file.</p>
</li>
<li><p class="first">Set the Linux-specific paths (or not).  These don't affect the operation
of D'Bridge, but they may allow D'Bridge to generate a BinkD configuration
file for you.  You can leave them unset, in which case D'Bridge may
complain, or you can make them match your actual configuration.</p>
</li>
<li><p class="first">Configure your BinkD sessions.</p>
<p>For each session, you'll need:</p>
<ol class="arabic simple">
<li>The FTN address of the system (e.g., 1:322/761).</li>
<li>The domain (&quot;fidonet&quot; for Fidonet).</li>
<li>A session ID. This should match the name of the outbound mailbox you
defined earlier in your BinkD configuration.</li>
<li>The phrase &quot;PICKUPONLY&quot; (since D'Bridge will not be handling BinkD
connections).</li>
<li>&quot;U&quot; to make D'Bridge generate uncompressed mail packets in the
outbound mailbox directory.</li>
</ol>
<p>My configuration looks like this:</p>
<div class="figure">
<img alt="images/binkd-sessions.png" src="images/binkd-sessions.png" />
</div>
<p><strong>NOTE</strong>: You will need an entry here for any system to which you wish
to route mail via BinkD.</p>
</li>
<li><p class="first">When you're done, the configuration screen should look something like
this:</p>
<div class="figure">
<img alt="images/binkd-config.png" src="images/binkd-config.png" />
</div>
</li>
</ol>
</div>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id12" id="how-i-m-using-d-bridge" name="how-i-m-using-d-bridge">How I'm using D'Bridge</a></h1>
<p>I'm using D'Bridge as my &quot;front-end&quot; interface to Fidonet, because it makes
things very easy to manage.  D'Bridge (running under DOSEmu) takes incoming
mail packets and then forwards them to Fidonet points on the backend; the
configuration looks something like this:</p>
<div class="figure">
<img alt="images/messageflow.png" src="images/messageflow.png" />
</div>
<p>This lets me feed two completely separate applications (a Synchronet BBS on
one system and a FTN/RFC gateway, using Cyrus IMAPd, on another) with only
a single public IP address.</p>
<hr class="docutils" />
<p><tt class="docutils literal"><span class="pre">*</span> <span class="pre">Origin:</span> <span class="pre">SomeBBS</span> <span class="pre">*</span> <span class="pre">telnet://somebbs.oddbit.com</span> <span class="pre">*</span> <span class="pre">Somerville,</span> <span class="pre">MA</span> <span class="pre">(1:322/761)</span></tt></p>
<!-- vim: set ts=2 sw=2 expandtab : -->
</div>
</div>
</body>
</html>
